Fix MacOS compiler warnings.
authorJohn Ralls <jralls@ceridwen.us>
Tue, 18 Jul 2017 21:47:25 +0000 (14:47 -0700)
committerJohn Ralls <jralls@ceridwen.us>
Wed, 19 Jul 2017 01:44:21 +0000 (18:44 -0700)
gtk/gtkclipboard-quartz.c

index b1150b9404b272ac43789baf35bc55c4c8243cb6..46cbca9606293d2ec53fd7a4f809bdac5250407a 100644 (file)
@@ -512,8 +512,11 @@ void
 gtk_clipboard_clear (GtkClipboard *clipboard)
 {
   clipboard_unset (clipboard);
-
-  [clipboard->pasteboard declareTypes:nil owner:nil];
+#ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+    [clipboard->pasteboard clearContents];
+#else
+    [clipboard->pasteboard declareTypes:nil owner:nil];
+#endif
 }
 
 static void
@@ -762,7 +765,6 @@ GdkPixbuf *
 gtk_clipboard_wait_for_image (GtkClipboard *clipboard)
 {
   GdkAtom target = gdk_atom_intern_static_string("image/tiff");
-  int i;
   GtkSelectionData *data;
 
   data = gtk_clipboard_wait_for_contents (clipboard, target);